<template>
	<view class="right-fix-main-box" style="pointer-events: none;">
		<image @click="showAgreementHandler(2)" mode="widthFix" class="img" :src="rootImagePath + 'rule-icon.png'" >
		</image>


	</view>
	<agreement-wx30 v-if="isShowAgreement" :rootImagePath="rootImagePath" :agreementType="agreementType"
		@ok="agreementOkHandler"></agreement-wx30>
</template>

<script setup>
	import {
		ref
	} from "vue";

	const props = defineProps(['rootImagePath'])
	const isShowAgreement = ref(false)
	const agreementType = ref(1) // 1-订购须知,2-隐私政策

	const showAgreementHandler = (value) => {
		isShowAgreement.value = true;
		agreementType.value = value;
	}

	
	const gotoUrl = (url) => {
			window.location.href = url
		}
		const quanyi = (url) => {
				window.location.href ='https://web.78keji.cn/newlq/#/'
			}

	const agreementOkHandler = () => {
		isShowAgreement.value = false;
	}

	const gotoWxPlatform = () => {
		console.log('gotoWxPlatform')
		window.location.href =
			'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI2ODEzMjg1Mg==&scene=124#wechat_redirect'
	}
	const telHandler = () => {
		uni.makePhoneCall({
			phoneNumber: '4008825010'
		})
	}
</script>

<style lang="scss">
	.right-fix-main-box {
		position: fixed;
		right: 20rpx;
		top: 41rpx;

		.img {
			width: 104rpx;
			height: auto;
			display: block;
			margin-bottom: 20rpx;
		
			pointer-events: auto
		}
	}
</style>